<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户列表</title>
</head>
<body>
<!--<div th:replace="~{common/header::header}"></div>-->
<h4 th:text="${userModel.title}">
    渡西湖
</h4>
<div>
    <a href="/user/form" th:href="@{/user/form}">
        新建用户
    </a>
</div>
<table border="2">
    <thead>
    <tr>
        <td>id</td>
        <td>名字</td>
        <td>年龄</td>
        <td>管理1</td>
        <td>管理2</td>
    </tr>
    </thead>
    <tbody>
    <tr th:if="${userModel.userList.size()} eq 0">
        <td colspan="3">无数据！</td>
    </tr>
    <tr th:each="user:${userModel.userList}">
        <td th:text="${user.id}"></td>
        <td><a th:href="@{'/user/'+${user.id}}" th:text="${user.name}"></a></td>
        <td th:text="${user.age}"></td>
        <td><a th:href="@{'/user/delete/'+${user.id}}">删除</a></td>
        <td><a th:href="@{'/user/edit/'+${user.id}}">编辑</a></td>
    </tr>
    </tbody>
</table>
<!--<div th:replace="~{common/footer::footer}"></div>-->
</body>
</html>